#ifndef STUDYJOURNAL_H
#define STUDYJOURNAL_H

#include <QWidget>
#include <QPainter>
#include <QMouseEvent>
#include <QTextEdit>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QDateTime>

class StudyJournal:public QWidget
{
    Q_OBJECT

public:
    StudyJournal();
    ~StudyJournal();
    //窗口大小
    int WinWidth=480;
    int WinHeight=640;
    //Label字体样式
    int labelFamily=0;      //字体样式
    int labelSize=18;       //字体大小
    bool labelBold=false;   //是否加粗
    bool labelItalic=false; //是否倾斜
    int fontR=244,fontG=190,fontB=228;
    void setLabelFont();

    //添加日志按钮
    QLineEdit *content=new QLineEdit(); //学习的内容
    QPushButton *hitCard=new QPushButton();//打卡按钮
    QDateTime current_date_time =QDateTime::currentDateTime();


    QLabel *journal=new QLabel(); //日志显示

    int transparency=50;        //透明度



    bool isPressScreen=false;   //是否按住了屏幕
    int mouseX;
    int mouseY;
    void paintEvent(QPaintEvent *event);
    void mousePressEvent(QMouseEvent *e);
    void mouseMoveEvent(QMouseEvent *e);
    void mouseReleaseEvent(QMouseEvent *e);

    QPushButton *set=new QPushButton("设置");

signals:
    void setBottom();
};

#endif // STUDYJOURNAL_H
